#include <bits/stdc++.h>

#define in read()
#define fi first
#define se second
#define pb push_back
#define rep(i, x, y) for(int i = (x); i <= (y); i++) 
#define per(i, x, y) for(int i = (x); i >= (y); i--)

using namespace std;

using ll = long long;
using db = double;
using pii = pair < int , int >;
using vec = vector < int >;
using veg = vector < pii >;

int read() {
	int x = 0; bool f = 0; char ch = getchar(); while(!isdigit(ch)) f |= ch == '-', ch = getchar(); 
	while(isdigit(ch)) x = x * 10 + (ch ^ 48), ch = getchar(); return f ? -x : x;
}

const int N = 1e5 + 10;
const int mod = 1e9 + 7;

int f[N], a[N], s, n, mx;

int upd(int x) { return x + (x >> 31 & mod); }
ll qp(ll x, int t) { ll res = 1; for(; t; t >>= 1, x = x * x % mod) if(t & 1) res = res * x % mod; return res; }
ll inv(ll x) { return qp(x, mod - 2); }

int main() {
#ifndef ONLINE_JUDGE
	freopen("1.in", "r", stdin);
#endif
	n = in; rep(i, 1, n) a[i] = in, s += a[i], mx = max(mx, a[i]);
	f[1] = 1ll * (s - 1) * (s - 1) % mod * qp(s, mod - 2) % mod;
	f[2] = upd(2ll * f[1] % mod - 1);
	int delta = upd(f[1] - f[2]); delta = upd(delta + (s - 1) % mod * qp(s - 2, mod - 2) % mod - mod);
	rep(i, 3, mx) {
		f[i] = upd(f[i - 1] - delta);
		delta = upd(delta + (s - 1) % mod * qp(s - i, mod - 2) % mod - mod);
	}
	int ans = 0; rep(i, 1, n) ans = upd(ans + f[a[i]] - mod); cout << ans << endl;
	return 0;
}
